 package server.maps;

 import client.MapleCharacter;
 import client.MapleClient;
 import client.skills.Skill;
 import client.skills.SkillFactory;
 import server.MapleStatEffect;
 import tools.MaplePacketCreator;

 public class MapleRune
   extends MapleMapObject {
   private final int type;
   private MapleMap map;

   public MapleRune(int type) {
/*  16 */     this.type = type;
   }

   public MapleMap getMap() {
/*  20 */     return this.map;
   }

   public void setMap(MapleMap map) {
/*  24 */     this.map = map;
   }

   public int getRuneType() {
/*  28 */     return this.type;
   }

   public final void applyToPlayer(MapleCharacter player) {
/*  32 */     int n2 = 0;
/*  33 */     boolean bl2 = false;
/*  34 */     switch (getRuneType()) {
       case 0:
/*  36 */         n2 = 80001427;
         break;

       case 1:
/*  40 */         n2 = 80001428;
         break;

       case 2:
/*  44 */         n2 = 80001432;
/*  45 */         bl2 = true;
         break;

       case 3:
/*  49 */         n2 = 80001752;
/*  50 */         SkillFactory.getSkill(80001762).getEffect(1).applyTo(player);
/*  51 */         bl2 = true;
         break;

       case 4:
/*  55 */         n2 = 80001753;
/*  56 */         SkillFactory.getSkill(80001757).getEffect(1).applyTo(player);
/*  57 */         bl2 = true;
         break;

       case 5:
/*  61 */         n2 = 80001754;
         break;

       case 6:
/*  65 */         n2 = 80001755;
         break;

       case 7:
/*  69 */         n2 = 80001877;
         break;

       case 8:
/*  73 */         n2 = 80001878;
         break;

       case 9:
/*  77 */         bl2 = true;
/*  78 */         SkillFactory.getSkill(80001876).getEffect(1).applyTo(player);
/*  79 */         n2 = 80001879;
         break;
     }
/*  82 */     if (bl2) {
/*  83 */       player.send(MaplePacketCreator.showRuneEffect(getRuneType()));
     }
/*  85 */     Skill skill = SkillFactory.getSkill(n2);
/*  86 */     MapleStatEffect effect = skill.getEffect(1);
/*  87 */     effect.applyTo(player);
/*  88 */     getMap().setRuneTime();
/*  89 */     remove();
   }


   public void sendSpawnData(MapleClient client) {
/*  94 */     client.announce(MaplePacketCreator.spawnRune(this, false));
   }


   public void sendDestroyData(MapleClient client) {
/*  99 */     client.announce(MaplePacketCreator.removeRune(this));
   }


   public MapleMapObjectType getType() {
/* 104 */     return MapleMapObjectType.RUNE;
   }

   public void remove() {
/* 108 */     getMap().removeRune(this);
/* 109 */     this.map = null;
   }
 }


/* Location:              C:\PGX\Server.jar!\server\maps\MapleRune.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */